package recipie.core;

import java.util.LinkedList;

import category.Category;

public class Ingredient {
	private String name;
	private MesureUnit defaultUnit;
	private LinkedList<Category> categories;
	
	public Ingredient(String n, MesureUnit d) {
		super();
		name = n;
		defaultUnit = d;
		categories = new LinkedList<Category>();
	}
	
	public String getName(){
		return name;
	}
	
	public MesureUnit getUnit(){
		return defaultUnit;
	}
	
	public void setUnit( MesureUnit mi){
		defaultUnit=mi;
	}
	
	public void setName(String n ){
		name = n;
	}
	
	public void setCategory (Category c)
    {
      this.categories.add(c);
    }
	
	public void setCategories(LinkedList<Category> categories)
	{
	  for( Category c : categories)
	      this.categories.add(c);
	}
	
	public LinkedList<Category> getCategories()
	{
	  return categories;
	}
}
